fix(capabilities): require explicit intent for named groups - #357
Conversation
Signed-off-by: seekskyworld <djh1813553759@gmail.com>
tt-a1i
left a comment
There was a problem hiding this comment.
需要改:祈使语境仍然太宽
去掉光秃的 subagent / workflow 保留字是对的。但 delegate 仍是:
\b(?:use|spawn|start)\s+(?:a\s+)?subagents?
「I use subagents in this repo」这种讨论句仍会授权。请再收紧到明确的委派/启动请求,并补这条负例。
|
2026-09-09 对照(未合并、未跑 Session)。 仍会加载(#303 未解): 会变成 inert(符合英文标识符目标):分支/文件/路径、 新漏开: CI 红在 biome format(for-of 写成一行),还没跑到会失败的 sibling 用例——本 PR 只改了 建议不要按当前 diff 合并。完整切片:拆保留词 + 不要用 本地对照: |
|
2026-09-09 follow-up: exact test contract this PR is still missing. The 09-09 earlier comment listed leftover firings and files; it did not publish file + assertion + expected, or which SETUP/README sentences become false after a merge. Local record: Do not merge this diff. Smallest fail-closed slice remains: drop reserved words, do not replace with Tests this PR never added (must be
|
Missing-test contract (review cannot flip on
|
tt-a1i
left a comment
There was a problem hiding this comment.
P2 已修复,明确请求和讨论语句已分离,双线复审无 P0/P1。check 与27项聚焦测试通过;完整 Node 测试1542通过、1跳过、1项未修改的 setup 子进程8秒超时,保留原断言的外部诊断8.2秒通过;130项 Vitest 通过。最新 CI 待确认。此账户推送了修复,仍需另一维护者满足最后推送后的独立批准。
Problem
Closes #303. Bare
subagent/workflowreferences in identifiers, discussion, or comparisons were treated as authorization under explicit discovery, causing optional tool groups to load unexpectedly.Value
Prevents accidental capability activation from pasted prompts and ordinary development vocabulary while preserving explicit delegation/workflow requests.
Approach
Require imperative English request forms for named capabilities, retain existing Chinese request forms, and add regressions for branch/file references and comparisons. Negated and conditional clauses continue to fail closed.
Validation
node --test --experimental-strip-types tests/extensions/shared/capability-intent.test.ts(5 passed)git diff --check(passed)Impact